import { formatTime } from '@/utils'
import i18n from '@/locales/index'
const { t } = i18n.global

export const columns = [
  { title: t('hangManage.makeNo'), dataIndex: 'moNo', key: 'moNo', align: 'center', width: 120, fixed: 'left' , visibility: true},
  { title: t('basicData.styleNo'), dataIndex: 'styleNo', key: 'styleNo', align: 'center', width: 120 , visibility: true},
  { title: t('basicData.styleNa'), dataIndex: 'styleName', key: 'styleName', align: 'center', width: 120, visibility: true },
  { title: t('hangManage.poNo'), dataIndex: 'poNo', key: 'poNo', align: 'center', width: 120 , visibility: true},
  { title: t('basicData.orderNo'), dataIndex: 'orderNo', key: 'orderNo', align: 'center', width: 120, visibility: true},
  { title: t('hangManage.scheduledNo'), dataIndex: 'scheduleBillNo', key: 'scheduleBillNo', align: 'center', width: 120, visibility: true },
  { title: t('basicData.color'), dataIndex: 'color', key: 'color', align: 'center', width: 120 , visibility: true},
  { title: t('basicData.size'), dataIndex: 'size', key: 'size', align: 'center', width: 120 , visibility: true},
  { title: t('hangManage.hangerNumber'), dataIndex: 'input', key: 'input', align: 'center', width: 120 , visibility: true},
  { title: t('report.outputNumber'), dataIndex: 'quantity', key: 'quantity', align: 'right', width: 120 , visibility: true},
  { title: t('other.unfinished'), dataIndex: 'unfinished', key: 'unfinished', align: 'right', width: 120 , visibility: true},
  // { title: '疵品数量', dataIndex: 'defectQuantity', key: 'defectQuantity', align: 'right', width: 120 },
  // { title: '疵品率(%)', dataIndex: 'defectPercent', key: 'defectPercent', align: 'center', width: 120 },
  {
    title: t('other.makeCreateDate'), dataIndex: 'createTime', key: 'createTime', align: 'center', width: 170, timeType: 'day', visibility: true,
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD')
    }
  },
]
export const  outputSumSearchParams = [
  {  title: t('hangManage.makeNo'), key: 'moNo' , type: 'input', maxLength: 29, disabled: true, show: true },
  {  title: t('basicData.styleNo'), key: 'styleNo'  , type: 'input', maxLength: 29, disabled: true, show: true },
  {  title: t('basicData.styleNa'), key: 'styleName'  , type: 'input', maxLength: 29 },
  {  title: t('hangManage.poNo'), key: 'poNo' , type: 'input', maxLength: 29 },
  {  title: t('basicData.orderNo'), key: 'orderNo' , type: 'input', maxLength: 29 },
  {  title: t('hangManage.scheduledNo'), key: 'scheduleBillNo' , type: 'input', maxLength: 29 },
  {  title: t('basicData.color'), key: 'color' , type: 'input', maxLength: 9 },
  {  title: t('basicData.size'), key: 'size' , type: 'input', maxLength: 9 },
  {  title: t('report.productDate'), key: 'ProductTime',  type: 'time' }
]